using UnityEngine;

public class CreditsUI : MonoBehaviour
{
	private GameObject uiobj;

	public UIEventListener closebtn;

	private bool isshow;

	private void Start()
	{
		closebtn.onClick = OnClickcloseBtn;
	}

	public void enable()
	{
		if (uiobj == null)
		{
			uiobj = base.gameObject;
		}
		NGUITools.SetActive(uiobj, state: true);
		isshow = true;
	}

	public void disable()
	{
		if (isshow)
		{
			isshow = false;
			NGUITools.SetActive(uiobj, state: false);
			MenuBackController.instance.BackMenuUIstate();
			MenuUIController.instance.enable_optionui();
		}
	}

	public void OnClickcloseBtn(GameObject btn)
	{
		MonoInstance<AudioController>.instance.play(AudioType.UI_BTN, 0f);
		disable();
	}
}
